''' <summary>
''' me is a game component that implements IUpdateable.
''' </summary>
Public Class Animation

	Public ReadOnly Property Texture As Texture2D

		Get
			Return _texture
		End Get

	End Property
	Private _texture As Texture2D

	''' <summary>
	''' durasi waktu untuk menampilkan tiap frame-nya
	''' </summary>
	Public ReadOnly Property FrameTime As Single
		Get
			Return _frameTime
		End Get
	End Property
	Private _frameTime As Single


	''' <summary>
	''' ketika animasi telah sampai pada frame terakhir
	''' dia akan ngeloop lagi dari awal
	''' </summary>
	Public ReadOnly Property IsLooping As Boolean

		Get
			Return _isLooping
		End Get
	End Property


	Private _isLooping As Boolean

	''' <summary>
	''' buat ngitung frame dalam animasinya
	''' </summary>
	Public ReadOnly Property FrameCount As Integer

            get 
			Return CInt(Texture.Width / FrameWidth)
		End Get
	End Property
	''' <summary>
	''' buat ngitung lebar frame animasinya
	''' </summary>
	Public ReadOnly Property FrameWidth As Integer

	''asumsikan framenya kotak
            get 
        return Texture.Height
	end get
	end property

	''' <summary>
	''' buat ngitung tinggi frame animasinya
	''' </summary>
	Public ReadOnly Property FrameHeight As Integer
            get  
            	return Texture.Height
		end get
        end property

	''' <summary>
	''' contruct animasi baru
	''' </summary>
	Public Sub New(texture As Texture2D, frameTime As Single, isLooping As Boolean)
		Me._texture = texture
		Me._frameTime = frameTime
		Me._isLooping = isLooping
	End Sub

End Class
